package com.qf.spring002.service.impl;

import com.qf.spring002.service.OnePieceParser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import java.io.IOException;

public class OnePieceParserImpl2 implements OnePieceParser {
    @Override
    public String parseOnePiece() {
        //https://www.tvmao.com/drama/YiYtJS0=
        Document doc = null;
        try {
            doc = Jsoup.connect("https://www.tvmao.com/drama/YiYtJS0=").get();
        } catch (IOException e) {
            e.printStackTrace();
        }
        //  System.out.println(doc);
        Element element = doc.selectFirst("li.over_hide");
        //  System.out.println(element);
        String text = element.text();

        return text;
    }
}
